<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Move div on click</title>
<script type="text/javascript">

function mouseClick(ev)
{
	ev = ev || window.event;
	if(ev.pageX || ev.pageY)
	{	
		var mouseCoords = document.getElementById("mouseCoords");
		mouseCoords.style.position = "absolute";
		mouseCoords.style.top = ev.pageY+"px";
	  	mouseCoords.style.left = ev.pageX+"px";
	  	mouseCoords.style.display = "block"
		  	
		
	}
}
</script>
<style type="text/css">
html,body {
	height: 100%;
	width: 100%;
}
</style>
</head>
<body onclick="mouseClick(event)">
<div id="mouseCoords"style="border: 1px black solid; height: 20%; width: 30%;"></div>
</body> 
</html>